<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="admin/layout">
<head>
<title>商品分类管理</title>
<script th:inline="javascript">
	/*<![CDATA[*/
	
			/*]]>*/
</script>
</head>
<body>
	<div layout:fragment="content">
		<div class="row">
			<div class="col-md-12">
				<div class="btn-group pull-right">
					<a href="index.html" th:href="@{/admin/product/category/index/}"
						id="sample_editable_1_new" class="btn green">返回<i
						class="fa fa-arrow-circle-o-left"></i></a>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<div class="form">
					<form role="form" th:action="@{/admin/product/category/save}" th:object="${category}"
						id="userForm" method="post" class="form-horizontal">
						<h4 class="form-section">分类信息</h4>
						<span th:if="${id} ==null " style="display:none">
									<span class="form-control"  >一级分类</span>
									</span>
									<span th:if="${id} !=null " style="display:none">
									<input class="form-control" th:name="categoryId"  th:value="${id}" ></input>
									</span>
						<div class="form-body">
							<div class="form-group">
								<label class="control-label col-md-3">所属分类:<span
									class="required" aria-required="true">* </span></label>
								<div class="col-md-4">
									<span th:if="${name} ==null " >
									<span class="form-control"  >一级分类</span>
									</span>
									<span th:if="${name} !=null " >
									<span class="form-control" th:text="${name}" ></span>
									</span>
									
								</div>
							</div>
							<div class="form-group"
								th:class="${#fields.hasErrors('name')}? 'form-group has-error' : 'form-group'">
								<label class="control-label col-md-3">分类名称:<span
									class="required" aria-required="true">* </span></label>
								<div class="col-md-4">
									<input type="text" class="form-control" placeholder="分类名称" th:field="*{name}" />
								</div>
							</div>
							<div class="form-group"
								th:class="${#fields.hasErrors('sort')}? 'form-group has-error' : 'form-group'">
								<label class="control-label col-md-3">分类排序:<span
									class="required" aria-required="true">* </span></label>
								<div class="col-md-4">
									<input type="text" class="form-control" placeholder="分类排序" th:field="*{sort}" />
								</div>
							</div>
							

						</div>
						<div class="form-actions fluid">
							<div class="col-md-offset-3 col-md-9">
								<button type="submit" class="btn blue" name="sub">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>

			<div style="display: none;">
				<form target="iframe_brand_image" action="/upload/USER"
					enctype="multipart/form-data" method="post" id="form_brand_image"
					name="form_brand_image">
					<input type="file" id="imgFile" onchange="uploadFile2(this)"
						name="imgFile" />
				</form>
			</div>
			<iframe style="display: none;" id="iframe_brand_image"
				name="iframe_brand_image" frameborder="0"></iframe>
		</div>
	</div>
</body>
</html>